local app = require 'app'
local game = app.game.running

local bid_result = game.ui.element()

function bid_result:ctor()
    self.res = "club.threecard.doudizhu/ui/ingame.b:bid_result"
    self.objs = {}
end

function bid_result:on_injected(bind)
    self.objs[game.util.consts.bid_pass.id] = self.bid_pass
    self.objs[game.util.consts.bid_1.id] = self.bid_1
    self.objs[game.util.consts.bid_2.id] = self.bid_2
    self.objs[game.util.consts.bid_3.id] = self.bid_3
end

function bid_result:on_result(action_id)
    self:show()
    for id, obj in pairs(self.objs) do
        obj:SetActive(id == action_id)
    end
end

return bid_result